<?php foreach ($data->albums as $a): ?>
<div class="album"><?php //debug($a); ?>
	<a href="?controller=Album&action=view&aid=<?php echo $a->getId(); ?>">
		<img src="<?php echo $a->getCover()->getUrl(); ?>" alt="" width="240" />
	</a>
	<span><?php echo $a->getName(); ?> (<?php echo $a->getNbImages(); ?> images)</span>
</div>
<?php endforeach; ?>